package base.render;

import org.lwjgl.opengl.GL11;

import base.common.ILiving;
import base.living.Entity;

public abstract class RenderEntity extends Render
{
	@Override
	public void onRender(ILiving par1ILiving)
	{
		Entity entity = (Entity) par1ILiving;
		
		drawShadow(entity.getPosX(), entity.getPosY(), (int) (entity.getShadowSize() * 1.5));
		
		this.onRender(entity);
	}

	public abstract void onRender(Entity par1Entity);

	public static void drawShadow(int par1, int par2, int par3)
	{
		GL11.glPushMatrix();
		GL11.glColor3f(0.1F, 0.1F, 0.1F);
		drawFilledCircle(par1, par2, par3, (int) (2.5 * Math.sqrt(par3)));
		GL11.glPopMatrix();
	}
}
